package web.PetStore.service;

import web.PetStore.domain.Cart;
import web.PetStore.persistence.CartDAO;
import web.PetStore.persistence.impl.CartDAOImpl;

import java.util.List;

public class CartService {
    private CartDAO cartDAO = new CartDAOImpl();

    public boolean addCart(Cart cart){
        return cartDAO.addCart(cart);
    }

    public List<Cart> getOrderByUserid(String userid){
        return cartDAO.getCartByUserid(userid);
    }

    public boolean deleteCartByCartid(List<Integer> cartid){
        return cartDAO.deleteCartByCartid(cartid);
    }
}
